var delimiter = ":";
function MoveOption (MoveFrom, MoveTo,ToDo) {
  var SelectFrom = eval('document.main_form.'+MoveFrom);
  var SelectTo = eval('document.main_form.'+MoveTo);
  var SelectedIndex = SelectFrom.options.selectedIndex;
  var container;

  if (ToDo=='Add') {
    container=eval('document.main_form.'+ToDo+MoveTo);
  }
  if (ToDo=='Remove') {
    container=eval('document.main_form.'+ToDo+MoveFrom);
  }
  if (SelectedIndex != -1) {
    for (i=0; i<SelectFrom.options.length; i++) {
      if(SelectFrom.options[i].selected) {
        var name = SelectFrom.options[i].text;
        var ID = SelectFrom.options[i].value;
        SelectFrom.options[i] = null;
        SelectTo.options[SelectTo.options.length]=new Option (name,ID);
        i=i-1;
        if(ToDo=='Add'||ToDo=='Remove') {
          container.value=container.value+name+delimiter;
        }
      }
    }
  }
}
